<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__PUBLIC__/Erp/Index/css/pintuer.css">
<link rel="stylesheet" href="__PUBLIC__/Erp/Index/css/admin.css">
<script src="__PUBLIC__/Erp/Index/js/jquery.js"></script>
<script src="__PUBLIC__/Erp/Index/js/pintuer.js"></script>
      <link rel="stylesheet" href="__PUBLIC__/bootstrop/bootstrap.min.css">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="__PUBLIC__/bootstrop/bootstrap.min.js"></script>
    <style>
                /* start 分页样式 */
                .pages a,.pages span {
                    display:inline-block;
                    padding:2px 5px;
                    margin:0 1px;
                    border:1px solid #f0f0f0;
                    -webkit-border-radius:3px;
                    -moz-border-radius:3px;
                    border-radius:3px;
                }
                .pages a,.pages li {
                    display:inline-block;
                    list-style: none;
                    text-decoration:none; color:#58A0D3;
                }
                .pages a.first,.pages a.prev,.pages a.next,.pages a.end{
                    margin:0;
                }
                .pages a:hover{
                    border-color:#50A8E6;
                }
                .pages span.current{
                    background:#50A8E6;
                    color:#FFF;
                    font-weight:700;
                    border-color:#50A8E6;
                }
                /* end 分页样式 */
    </style>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> Reference Library静态界面列表</strong></div>
  <div class="padding border-bottom">
  <!--<button type="button" class="button border-yellow" onclick="window.location.href='__CONTROLLER__/addNews'"><span class="icon-plus-square-o"></span> 添加内容</button>-->
  </div>
  <table class="table table-hover text-center">
    <tr>
      <th>ID</th>
      <th>标题</th>
      <th>界面链接</th>
      <th style="width: 20%">SEO Title</th>
      <th style="width: 20%">SEO Description</th>
      <th style="width: 20%">SEO Keywords</th>
      <th>操作</th>
    </tr>


               <foreach name="info" item="vo" >
    <tr>
      <td>{$vo.id}</td>
      <td>{$vo.title}</td>
      <td>{$vo.static_html}</td>
      <td>{$vo.seotitle}</td>
      <td>{$vo.seodescription}</td>
      <td>{$vo.seokeywords}</td>
      <td><div class="button-group">
					<button class='btn btn-primary' onclick='create_static_html("{$vo.id}",this)' >生成静态界面</button>
                    <a class='btn btn-primary' href="http://{$vo.preview_url}" target='_blank'>本地预览</a>
					<button class='btn btn-danger' id='ftp_upload'>FTP上传</button>
      </div></td>
    </tr>
                           </foreach>


                  <tr class="content">
                <td colspan="11" bgcolor="#FFFFFF"><div class="pages">
                        {$page}
                </div></td>
            </tr>
  </table>
</div>
<script type="text/javascript">
    $('#ftp_upload').on('click',function(){
        alert('正在开发中 ^_^ ');
    });
    function create_static_html(id,obj){
        var check = confirm("是否确保该新闻下所有信息均已录入？是否确定生成静态界面？");
        if(check){
            $(obj).attr('disabled',true);
            $(obj).text('生成中...');
            $.post("__MODULE__/Stanfordmaterials/productStaticLibraryHtml",{id:id},function(v){
                alert('生成成功');
                location.reload();
            });
        }
    }
</script>
</body></html>